const mongoose = require('mongoose');
const TaskSchema = new mongoose.Schema({
   title: {
      type: String,
      required: true,
   },
   completed: {
      type: Boolean,
      default: false,
   },
   create_time: {
      type: Date,
      default: Date.now,
   },
   completed_time: {
      type: Date || String,
      default: '',
   },
});

module.exports = mongoose.model('Task', TaskSchema);
